import torch as pt
from python_ai.common.xcommon import *

pt.set_printoptions(edgeitems=100)

sep('3x4')
x = pt.arange(1, 3*4+1).view(3, 4)
print(x)

x2 = x.clone()
x2 *= 10
print(x2)

x3 = x * 100

sep('stack dim=0')
xs0 = pt.stack((x, x2, x3), dim=0)
print(xs0)

sep('stack dim=1')
xs1 = pt.stack((x, x2, x3), dim=1)
print(xs1)

sep('stack dim=2')
xs2 = pt.stack((x, x2, x3), dim=2)
print(xs2)